﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BeerScanatronUI
{
    public partial class EnterTextDialog : Form
    {
        public string Prompt { get; set; }
        public string Response { get; private set; }

        public EnterTextDialog(bool password)
        {
            this.BackColor = Consts.Theme.BackColor;

            InitializeComponent();

            textBox1.UseSystemPasswordChar = password;
            textBox1.Focus();
        }

        private void EnterTextDialog_Load(object sender, EventArgs e)
        {
            textBox1.Text = "";
            label1.Text = Prompt;
        }

        private void EnterTextDialog_FormClosing(object sender, FormClosingEventArgs e)
        {
            Response = textBox1.Text;
        }
    }
}
